#ifdef WIN32
#include <Windows.h>

#endif

#include "wlog.hpp"

#include "utils/write_log.hpp"



#ifdef __ANDROID__

#include <android/log.h>

#define  LOG_TAG    "cppprint"
#define LOGI(...)  __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGD(...)  __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGE(...)  __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)

#endif // __android__
using namespace std;




wlog::~wlog()
{
	oss_ << "\n";
	str_ = oss_.str();

#ifdef __ANDROID__
	LOGE("%s", str_.c_str());
#endif

#ifdef WIN32
	OutputDebugStringA(str_.c_str());
#endif

}


flog::~flog()
{
	oss_ << "\n";
	str_ = oss_.str();
#ifdef WIN32
	OutputDebugStringA(str_.c_str());
#endif
	write_log::instance()->log_out("debug", str_);

}
